package com.itheima.mapper;

import com.itheima.domain.UmsRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 后台用户角色表 Mapper 接口
 * </p>
 *
 * @author zhuguo
 * @since 2022-11-10
 */
public interface UmsRoleMapper extends BaseMapper<UmsRole> {

    // 查询全部
    @Select("select * from mall.ums_role where status = 1")
    List<UmsRole> selectAll();


    // 修改角色状态
    @Update("update mall.ums_role set status = #{status} where id = #{id};")
    void updateStatus(@Param("id") Integer id, @Param("status") Integer status);

}
